<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .peng-enter-active, .peng-leave-active{
      transition:opacity 3s;
    }
    .peng-enter, .peng-leave-to{
      opacity:0;
    }

    
    .move-enter-active{
      transition:all 5s;
    }
    .move-enter,.move-leave-to{
      opacity:0;
      transform:translateX(50px);
    }
  </style>
</head>
<body>
  <div id="demo">
    <button @click='show=!show'>
      Toggle
    </button>
    <transition name='peng'>
      <p v-show='show'>hello world</p>
    </transition>
  </div>
  <div id="demo2">
    <button @click='show=!show'>
      Toggle
    </button>
    <transition name='move'>
      <p v-show='show'>hello world</p>
    </transition>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    new Vue({
      el:"#demo",
      data:{
        show:true
      }
    })
    new Vue({
      el:"#demo2",
      data:{
        show:true
      }
    })
  </script>
</body>
</html>